'use strict'

/*
|--------------------------------------------------------------------------
| Router
|--------------------------------------------------------------------------
|
| AdonisJs Router helps you in defining urls and their actions. It supports
| all major HTTP conventions to keep your routes file descriptive and
| clean.
|
| @example
| Route.get('/user', 'UserController.index')
| Route.post('/user', 'UserController.store')
| Route.resource('user', 'UserController')
*/

const Route = use('Route')

Route.on('/').render('welcome')

Route.get('/hello',async (req,res,next)=>{
    console.log('进来了')
    await res.send('进来了')
});

// Route.get('/about',(request,response)=>{
//     console.log('come in')
//     response.send('<h1>关于我们</h1>'+request.input('name'));
// });

Route.get('/about','HelloController.render');